﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;

namespace NQueries.TestSupport
{
    /// <summary>
    /// Is raised, if a nested <see cref="IUnitOfWork"/> is rolled back.
    /// </summary>
    [Serializable]
    public class TestException : Exception
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        [DebuggerNonUserCode]
        public TestException() { }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="message"></param>
        [DebuggerNonUserCode]
        public TestException([Localizable(false)] string message)
            : base(message) { }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="inner"></param>
        [DebuggerNonUserCode]
        public TestException([Localizable(false)] string message, Exception inner)
            : base(message, inner) { }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        [DebuggerNonUserCode]
        protected TestException(SerializationInfo info, StreamingContext context)
            : base(info, context) { }
    }
}